home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef __MMAC
- #define __MMAC
-
- #include <quickdraw.h>
- #include <events.h>
- #include <memory.h>
- #include <files.h>
- #include <stdio.h>
- #include <fcntl.h>
- #include <errno.h>
-
- #define S_IFMT 0170000 /* type of file */
- #define S_IFDIR 0040000 /* directory */
- #define S_IFREG 0100000
- #define S_IFLNK 0120000
-
- // Let's just make a simple linked list for directory listings
- typedef struct DirList {
- char *name;
- struct DirList *next;
- } DirList;
-
- struct stat {
- unsigned short st_mode;
- unsigned long st_size;
- unsigned long st_mtime;
- };
-
- char *crypt(char *pw, char *salt);
- int random(void);
- int macopen(const char *fname, int mode);
- FILE *macfopen(const char *fname, const char *mode);
- int macrename(const char *oldname, const char *newname);
- int macremove(const char *filename);
-
- DirList *macgetdir(char *pathname);
- int maccountdir(DirList *dirlist);
- void macfreedir(DirList *dirlist);
-
- void start_timer(short seconds);
- int timer_expired(void);
-
- int mkdir(char *path, int mode);
- int rmdir(char *path);
-
- int stat(char *fname, struct stat *buf);
-
- #endif